<script setup lang="ts">
import { MyIcon } from "@/components/MyIcon";
import { useAppStore } from "@/store/modules/app";
import { computed } from "vue";
const appStore = useAppStore();
const collapse = computed(() => appStore.getCollapse);

const changeCollapse = () => {
  appStore.setCollapse();
};
</script>

<template>
  <MyIcon
    style="padding: 5px; cursor: pointer"
    @click="changeCollapse"
    size="22px"
    v-if="collapse"
    :icon="'el:fold'"
  ></MyIcon>
  <MyIcon
    v-else
    style="padding: 5px; cursor: pointer"
    @click="changeCollapse"
    size="22px"
    :icon="'el:expand'"
  ></MyIcon>
</template>

<style lang="less" scoped></style>
